package netctoss.demo.mapper;

import netctoss.demo.entrty.Account;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface AccountMapper extends Mapper<Account> {

    @SelectProvider(type = AccountProvider.class,method ="selectPage" )
    List<Account> selectPage(Account account);

    @Select("SELECT  a.account_idcard_no recommender_IdcardNo, ac.* from account ac " +
            "LEFT JOIN account a on ac.account_recommender_id = a.account_id where ac.account_id = #{aid}")
    Account selectByAid(Long aid);
}
